
<%@ page import="projetjee.Relationship" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'relationship.label', default: 'Relationship')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-relationship" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-relationship" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list relationship">
			
				<g:if test="${relationshipInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="relationship.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${relationshipInstance}" field="name"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${relationshipInstance?.createur}">
				<li class="fieldcontain">
					<span id="createur-label" class="property-label"><g:message code="relationship.createur.label" default="Createur" /></span>
					
						<span class="property-value" aria-labelledby="createur-label"><g:link controller="user" action="show" id="${relationshipInstance?.createur?.id}">${relationshipInstance?.createur?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${relationshipInstance?.members}">
				<li class="fieldcontain">
					<span id="members-label" class="property-label"><g:message code="relationship.members.label" default="Members" /></span>
					
						<g:each in="${relationshipInstance.members}" var="m">
						<span class="property-value" aria-labelledby="members-label"><g:link controller="user" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${relationshipInstance?.subscribers}">
				<li class="fieldcontain">
					<span id="subscribers-label" class="property-label"><g:message code="relationship.subscribers.label" default="Subscribers" /></span>
					
						<g:each in="${relationshipInstance.subscribers}" var="s">
						<span class="property-value" aria-labelledby="subscribers-label"><g:link controller="user" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${relationshipInstance?.id}" />
					<g:link class="edit" action="edit" id="${relationshipInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:link class="edit" controller="Relationship" action="addAmiGroupe" params="[relation:"${relationshipInstance.id}"]"> <%--<g:link class="edit" action="edit" id="${relationshipInstance?.id}">--%>
						S'ajouter au groupe
					</g:link>
					<g:link class="edit" controller="Relationship" action="delAmiGroupe" params="[relation:"${relationshipInstance.id}"]"> <%--<g:link class="edit" action="edit" id="${relationshipInstance?.id}">--%>
						Quitter le groupe
					</g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
